extends ../template/base

block stylesheet
    link(type="text/css",rel="stylesheet",href="#{rootPath}/module/css/imgEdit.css")
    link(type="text/css",rel="stylesheet",href="#{rootPath}/common/css/date.css")

block header
    include ../template/header
block left
    include ../template/left

block right
    #right
        .navigation
            .ui.breadcrumb
                .section 首页
                i.right.angle.icon.divider
                .section 栏目定义
                i.right.angle.icon.divider
                .active.section 图片轮播设置
        .module_imgEdit
            h1.ui.horizontal.divider 轮播图片信息
            .ui.form
                .three.fields
                    module(v-bind:class_id='params.classId')
                    ymd(v-bind:ymd='params.date')
                    .field
                        label 有效时间
                        select.ui.fluid.dropdown(v-model='params.eq')
                            option(value='>')  大于日期
                            option(value='=')  等于日期
                            option(value='>=') 大于等于日期
                .img_ground
                    .img_show
                        img(v-bind:src='url(params.photos[count_1].photoUrl)')
                        .img_info
                            div 名称:{{params.photos[count_1].name}}
                            div 图片地址:{{params.photos[count_1].photoUrl}}
                            div 指向内容地址:{{params.photos[count_1].contentUrl}}
                    .img_thumb
                        .item(:class='{active: index == count_1}', v-for='(item,index) in params.photos', @click='count_1 = index')
                            img(:src='url(item.photoUrl)')
                            span.clear(v-if="item.photoUrl != ''", @click='clear(index)')
                                i.remove.icon
                            span.select(v-on:click='select(index+1)', v-if="item.photoUrl == ''") 选择文件
                            span.upload(v-if="item.photoUrl == ''", @click='upload(index)')
                                i.upload.icon
                                | 上传
                            span.success(v-if="item.photoUrl != ''")
                                i.checkmark.icon
                        input#img_1(type='file', @change='change($event)', name='img_1', v-show='false')
                        input#img_2(type='file', @change='change($event)', name='img_2', v-show='false')
                        input#img_3(type='file', @change='change($event)', name='img_3', v-show='false')
                        input#img_4(type='file', @change='change($event)', name='img_4', v-show='false')
                        input#img_5(type='file', @change='change($event)', name='img_5', v-show='false')
                    .img_select
                        .fields
                            .four.wide.field
                                label 图片组栏目
                                select.ui.fluid.dropdown(v-model='img_select')
                                    option(value='img_1') 图片一
                                    option(value='img_2') 图片二
                                    option(value='img_3') 图片三
                                    option(value='img_4') 图片四
                                    option(value='img_5') 图片五
                            .six.wide.field
                                label 名称
                                input(v-model='params.photos[count_2].name', placeholder='请输入名称')
                            .six.wide.field
                                label 指向内容地址
                                input(v-model='params.photos[count_2].contentUrl', placeholder='请输入内容地址')
                .submit
                    span(v-on:click='save') 保存

block javascript
    script(type='text/javascript',src='#{rootPath}/common/lib/ajaxfileupload.js')
    script(type='text/javascript',src='#{rootPath}/module/js/imgEdit.js')

